home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / keypres2.zip / DOKEY.BAT next >
DOS Batch File  |  1987-11-14  |  640b  |  36 lines

  1. ECHO OFF
  2. REM Short demo for KEYPRESS.COM.
  3. REM Doesn't do anything, but shows you how to use it.
  4. REM David Kirschbaum, Toad Hall
  5. :QUERY
  6. ECHO PRESS A OR B OR C
  7. ECHO A  1DIRPLUS
  8. ECHO B  PC-WRITE
  9. ECHO C  Something weird
  10. Echo D  Exit to DOS
  11. KEYPRESS A B C D
  12. if errorlevel 4 goto Exit
  13. if errorlevel 3 goto c
  14. if errorlevel 2 goto b
  15. if errorlevel 1 goto a
  16. ECHO TRY AGAIN
  17. GOTO QUERY
  18. :a
  19. Echo I would have done this:
  20. REM 1DIR
  21. Echo 1DIR
  22. goto Query
  23. :b
  24. Echo I would have done this:
  25. REM CD\PCW
  26. REM ED
  27. Echo CD\PCW
  28. Echo ED
  29. goto Query
  30. :c
  31. Echo I would have done this:
  32. REM BOGUS
  33. Echo BOGUS
  34. goto Query
  35. :exit
  36.